import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/headerProperties/addOrSave',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: 'api/headerPropertiesConfig/update',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/headerPropertiesConfig/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/headerProperties/addOrSave',
    method: 'post',
    data
  })
}

export function copy(data) {
  return request({
    url: 'api/headerProperties/copy',
    method: 'post',
    data
  })
}

export function exportDe(data) {
  return request({
    url: 'api/headerProperties/export',
    method: 'post',
    data
  })
}

export function importDe(data) {
  return request({
    url: 'api/headerProperties/import',
    method: 'post',
    data
  })
}

export function queryHeaderProperties(data) {
  return request({
    url: '/api/headerProperties',
    method: 'get',
    params: data
  })
}

export function getHeaderProperties(data) {
  return request({
    url: '/api/common/getHeaderProperties',
    method: 'get',
    params: data
  })
}

export function syncHeaderPropertiesToChildCompany(data) {
  return request({
    url: '/api/common/syncHeaderPropertiesToChildCompany',
    method: 'post',
    data
  })
}

export default { add, update, edit, copy, exportDe, importDe, del }
